* {
  padding: 0;
  margin: 0;
}

html {
  font-size: 62.5%;
  font-family: "Microsoft YaHei", sans-serif;
}

body {
  text-align: center;
  background-color: #e0e0e0;
  font-size: 1.4rem;
}

#container {
  margin: 1.6rem;
  max-width: 76.7rem;
  border-radius: 0.4rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  border-top: 1px solid #fafafa;
}

header {
  height: 4rem;
  line-height: 4rem;
  position: relative;
  text-align: center;
}

#indicator {
  height: 0.4rem;
  background-color: rgba(0, 0, 0, 0.4);
  width: 25%;
  position: absolute;
  left: 0;
  top: 0;
}

#content {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  justify-content: flex-start;
  padding: 0.8rem;
}

.card {
  background: white;
  flex: 1 1 20%;
  margin: 0.8rem;
  border-radius: 0.4rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.card:after {
  content: '';
  padding-top: 100%;
  display: block;
}

nav {
  float: left;
  width: 25%;
  cursor: pointer;
  color: #757575;
  background-color: #f5f5f5;
  overflow: hidden;
  background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.1) 0%, transparent 50%);
  transition: font 0.2s ease;
}

nav.current {
  background-color: transparent;
  color: black;
  font-size: 1.6rem;
  font-weight: 800;
  background-image: none;
}

.flip {
  animation: flip 0.2s ease 1s;
}

@keyframes flip {
  0% {
    transform: rotate3d(0, 1, 0, 0deg);
  }

  100% {
    transform: rotate3d(0, 1, 0, 360deg);
  }
}